<template>
    <div class="find-teammate">
        <div class="ma-sub-title">
            看看谁是你队友中的黄金搭档
        </div>
        <!--查看用户bar组件 START-->
        <vue-scroll :pullDownRefresh="false" :pullUpLoad="false">
            <div class="find-teammate-sub-title">
                TOP 3
            </div>
            <teammate-bar :matchList="teammates"></teammate-bar>
        </vue-scroll>
        <!--查看用户bar组件 END-->
    </div>
</template>

<script>
    import TeammateBar from "./components/teammatebar/TeammateBar"
    import axios from 'axios'
    export default {
        components: {TeammateBar},
        name: "Teammate",
        data() {
            return {
                teammates: []
            }
        },
        created() {
            // 后期可能路由传参
            this.getTeammates();
        },
        methods: {
            getTeammates() {
                axios.get("https://worldcup.dmpb.com.cn/api/java/question/match/friendRank?openid=oJEP8t03z5DrCC5X9ochRlh7i2DY").then((res) => {
                    if (res.data.code === 0) {
                        this.teammates = res.data.data;
                    } else {

                    }
                })
            }
        }
    }
</script>

<style>
    .find-teammate {
        width: 100%;
        height: 100%;
        padding-top: 40px;
    }
</style>
